#ifndef VIEWVOLUME
#define VIEWVOLUME

#include <base\box3f.h>
#include <base\vec3d.h>
#include <base\dpViewVolume.h>

class viewVolume {

  dpViewVolume dpvv;

public:

  vec3f projPoint;
  vec3f projDir;
  float nearDist;
  float nearToFar;
  vec3f llf;
  vec3f lrf;
  vec3f ulf;

public:

  void perspective(float fovy, float aspect, float nearval, float farval);
  void translateCamera(const vec3f & v);
  void rotateCamera(const rotation & r);

  void getViewVolumePlanes(plane planes[6]) const;
  bool intersect(const box3f & box) const;
};

#endif